package com.gitee.consumerzk.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName OrderzkController
 * @Description TODO
 * @Author xiongchao
 * @Date 2020/12/11 16:10
 **/
@RestController
@Slf4j
public class OrderzkController {

    private static final String ORGIN_URL ="http://payment-zk";

    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/consumer/zk")
    public String orderZk(){
        return restTemplate.getForObject(ORGIN_URL + "/payment/zk" ,String.class);
    }
}
